''' PT Practice #2 Modify Display_parameters program Part 1 ''' from codex import * from time import sleep button_list = [ ["Hold BTN-A", BTN_A], ["Hold BTN-B", BTN_B], ["Hold UP", BTN_U], ["Hold DOWN", BTN_D], ["Hold RIGHT", BTN_R], ["Hold LEFT", BTN_L] ] delay = 1 def play_game(): for index in range(button_list): message = button_list[index][0] button = button_list[index][1] display.show(message) sleep(delay) pressed = buttons.is_pressed(button) if pressed: pixels.fill(GREEN) else: pixels.fill(RED) # -- Main Program play_game()